<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>ViewModel </title>
</head>
<body>
    <div id="app">
        <input type="text" v-model="msg">
        <p>{{tip}}</p>
        <p>{{msg}}</p>
        <p>{{newMsg}}</p>
    </div>
    <div id="app1">
        <input type="text" >
        <p></p>
    </div>
    <script src="./js/vue.js"></script>
    <script>
        const app = new Vue({
            el:"#app",
            data:{
                msg:"",
                tip:"下面会动态的显示上面Ipnut的输入内容",
                newMsg:null
            }
        })
    </script>
    //用原生Js
    <script>
        let msg = ''
        const ipt = document.querySelector('#app1 input')
        const p = document.querySelector('#app1 p')
        ipt.oninput = function(){
            msg = ipt.value
            p.innerText = msg
        }
    </script>
</body>
</html>